<html><head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>销售明细</title>
  <#assign base=request.contextPath  />
    	<base id="basePath" href="${base}">

    	<base id="basePath" href="${base}">
    	<link rel="stylesheet" href="${base}/css/demo.css" type="text/css">
    	<link rel="stylesheet" href="${base}/css/zTreeStyle.css" type="text/css">
    	<script type="text/javascript" src="${base}/js/ztree/jquery-1.4.4.min.js"></script>
    	<script type="text/javascript" src="${base}/js/ztree/jquery.ztree.core.js"></script>
    	<script type="text/javascript" src="${base}/js/zhang.js"></script>
    	<script type="text/javascript" src="${base}/js/ztree/jquery.ztree.excheck.js"></script>
    	<script type="text/javascript" src="${base}/js/ztree/jquery.ztree.exedit.js"></script>



  <link rel="stylesheet" href="${base}/js/layui/css/layui.css?t=1534970980648" media="all">

</head>

<body>
<input type="hidden" id="personSTR" value="${person}">
<table class="layui-hide" id="test" lay-filter="test"></table>
<script src="${base}/js/layui/layui.js" charset="utf-8"></script>
<script src="${base}/js/jquery.min.js"></script>
<script>
var paramSTR=$('#personSTR').val();

layui.use('table', function(){
  var table = layui.table; 
  table.render({
    elem: '#test'
    ,url:'${base}/situationAnalysis/selectByPerson'
    ,toolbar: '#toolbarDemo'
    ,title: '销售明细数据表'
    ,totalRow: true
    ,width:680
    ,height:450
    ,cols: [[
    {field:'id',templet:function(val){
                  return val.LAY_INDEX
               },title:'ID',align: 'center', width:60, fixed: true,totalRowText: '合计'}
      ,{field:'sname', title:'客户姓名', width:140,align:'center'}
      ,{field:'mealName', title:'套餐', width:160,align:'center',totalRowText: '总金额:'}
      ,{field:'consumption', title:'金额', width:120, totalRow: true,align:'center'}
      ,{field:'date', title:'时间',templet:function(val){
                                       return DateFormat(val.date);
                                       }, width:200,align:'center'}
    ]]
    ,where:{'person':paramSTR}
    ,page: {
               layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
               ,theme: '#0092EF'
                ,limit:20

             }
  });
});

</script>

</body>
</html>


